﻿<navigation:Page x:Class="LEEAAttendanceControl.Views.AccountingPeriod"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="Accounting Period">
    <Grid x:Name="LayoutRoot">
        <ScrollViewer VerticalScrollBarVisibility="Auto">
            <StackPanel Orientation="Vertical">
                <Grid Background="#404041">
                    <sdk:Label Content="Accounting Period" FontSize="14" Foreground="White" FontWeight="Bold"
                               Margin="5,3,2,2"/>
                </Grid>
                
                <Grid Margin="25,30,0,0" HorizontalAlignment="Left">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>
                    
                    <RadioButton x:Name="UserRadio" Content="User Defined" Grid.Row="0" IsThreeState="False"
                                 IsChecked="True"/>
                    
                    <Grid Grid.Row="1" Margin="25,20,0,20" HorizontalAlignment="Left">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="60"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="45"/>
                            <ColumnDefinition Width="60"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        
                        <sdk:Label Content="From:" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center"
                                   Margin="3" IsEnabled="{Binding IsChecked, ElementName=UserRadio}"/>
                        <sdk:DatePicker Width="120" Grid.Column="1" Margin="3"
                                        IsEnabled="{Binding IsChecked, ElementName=UserRadio}"/>
                        
                        <sdk:Label Content="To:" Grid.Column="3" HorizontalAlignment="Left" VerticalAlignment="Center"
                                   Margin="3" IsEnabled="{Binding IsChecked, ElementName=UserRadio}"/>
                        <sdk:DatePicker Width="120" Grid.Column="4" Margin="3"
                                        IsEnabled="{Binding IsChecked, ElementName=UserRadio}"/>
                    </Grid>
                    
                    <RadioButton Content="Weekly" Grid.Row="2" IsThreeState="False"/>
                    
                    <Button x:Name="ApplyButton" Content="Apply" Grid.Row="3" Height="25" Width="65" Margin="0,20,0,0"
                            HorizontalAlignment="Right" Click="ApplyButton_Click"/>
                </Grid>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</navigation:Page>
